package com.javaweb.config;

import com.javaweb.Role;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class SpringConfig {

    @Bean
    @Scope("singletonRole")
    public Role SingletonRole(){
        return new Role(1,"1","role");
    }
    @Bean
    @Scope("prototype")
    public Role PrototypeRole(){
        return new Role(2,"2","role");
    }
}
